-- GENERATED SPELL FOR [Razzashi Serpent] --


function spell0_11371(pUnit, Event) --@Fatal Bite,Heal--
pUnit:FullCastSpellOnTarget(20539,pUnit)
pUnit:RegisterEvent('Sorts_11371', 555, 1)
end

function spell1_11371(pUnit, Event) --@Pierce Armor,n/a--
pUnit:FullCastSpellOnTarget(12097,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11371', 20261, 1)
end

function spell2_11371(pUnit, Event) --@Tranquilizing Poison,n/a--
pUnit:FullCastSpellOnTarget(24002,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11371', 8000, 1)
end

function spell3_11371(pUnit, Event) --@Tranquilizing Poison,n/a--
pUnit:FullCastSpellOnTarget(24003,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11371', 8000, 1)
end

function Sorts_11371(pUnit, Event)
local choix_sorts_11371 = math.random(0, 3)
if choix_sorts_11371 == 0 then
pUnit:RegisterEvent('spell0_11371', 1, 1)
end
if choix_sorts_11371 == 1 then
pUnit:RegisterEvent('spell1_11371', 1, 1)
end
if choix_sorts_11371 == 2 then
pUnit:RegisterEvent('spell2_11371', 1, 1)
end
if choix_sorts_11371 == 3 then
pUnit:RegisterEvent('spell3_11371', 1, 1)
end
end

function mob11371_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_11371', math.random(1500, 3000), 1)
end

function mob11371_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11371_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11371_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(11371, 1, 'mob11371_Action')
RegisterUnitEvent(11371, 2, 'mob11371_Leave')
RegisterUnitEvent(11371, 3, 'mob11371_Kill')
RegisterUnitEvent(11371, 4, 'mob11371_Die')
